import Vue from 'vue';
import VueRouter from 'vue-router';
import CampusBinhai from '../views/CampusBinhai.vue';
import CampusChashan from '../views/CampusChashan.vue';
import CampusChashanBuilding5 from '../views/CampusChashanBuilding5.vue';
import CampusChashanBuilding6 from '../views/CampusChashanBuilding6.vue';
import CampusChashanBuilding7 from '../views/CampusChashanBuilding7.vue';
import CampusYueqing from '../views/CampusYueqing.vue';
import StudentSystem from '../views/StudentSystem.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'CampusBinhai',
    component: CampusBinhai
  },
  {
    path: '/campus-chashan',
    name: 'CampusChashan',
    component: CampusChashan,
    children: [
      {
        path: 'building-5',
        component: CampusChashanBuilding5
      },
      {
        path: 'building-6',
        component: CampusChashanBuilding6
      },
      {
        path: 'building-7',
        component: CampusChashanBuilding7
      }
    ]
  },
  {
    path: '/campus-yueqing',
    name: 'CampusYueqing',
    component: CampusYueqing
  },
  {
    path: '/student-system',
    name: 'StudentSystem',
    component: StudentSystem
  }
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router;    